layui.config({
    base: '../../common/module/'
}).extend({
    formSelects: 'formSelects/formSelects-v4',
    treetable: 'treetable-lay/treetable',
    dropdown: 'dropdown/dropdown',
    notice: 'notice/notice',
    step: 'step-lay/step',
    dtree: 'dtree/dtree',
    citypicker: 'city-picker/city-picker',
    tableSelect: 'tableSelect/tableSelect',
    serverUrl: 'base_serverUrl',
    selectOption: 'selectOption',
    tableMerge: "tableMerge/tableMerge"
    // admin:'admin'
}).use(['layer', 'element', 'config', 'index', 'admin', 'laytpl', 'serverUrl', 'selectOption', 'tableMerge'], function () {
    var $ = layui.jquery;
    var layer = layui.layer;
    var element = layui.element;
    var config = layui.config;
    var index = layui.index;
    var admin = layui.admin;
    var laytpl = layui.laytpl;
    var serverUrl = layui.serverUrl;
    var selectOption = layui.selectOption;
    //合并行
    var tableMerge = layui.tableMerge;


    admin.removeLoading();


   //菜单功能设置
    var menuJson 
    /*selectOption.send_req('admin/User/user_menu.html', {user_id: config.getToken().user_id}, function(data){
        menuJson = data
        layer.closeAll('loading');
        layer.closeAll();
        menuJson.some( (ele) => {
            if(ele.name == '系统管理'){
                if(ele.subMenus.url == '#/system/user_platform'){
                    selectOption.send_req('qisheng/Main/daiban_user.html', {}, function(data){
                        if(data.is_show == 0){
                            
                        }else{
                            $('#daiban').removeClass('hidden').addClass('show')
                            $('.layui-badge-dot').removeClass('hidden').addClass('show')
                        }
                    })
                }
            }
        })
    })*/
    // if(config.getToken()){

    // }else{
        // selectOption.send_req('qisheng/Main/daiban_user.html', {}, function(data){js
        //     if(data.is_show == 0){

        //     }else{
        //         $('#daiban').removeClass('hidden').addClass('show')
        //         $('.layui-badge-dot').removeClass('hidden').addClass('show')4
        //     }
        // })
    // }
    /*$('#daiban').click(function(){
        $('.layui-badge-dot').removeClass('show').addClass('hidden')
    })*/
    /*laytpl(sideNav.innerHTML).render(menuJson, function (html) {
        $('.layui-layout-admin .layui-side .layui-nav').html(html);
        element.render('nav');
    });*/
   /* index.regRouter(menuJson); // 注册路由
    index.loadHome({ // 加载主页
        url: '#/welcome',
        name: '<i class="layui-icon layui-icon-home"></i>'
    });*/
    var OtherRouter = [
        {
            "name": "询价详情",
            "url": "./html/inquiry/detail.html"
        },
    ];
    index.regRouter(OtherRouter); // 其他界面路由
    $('#shousuo').css({top: ($('.layui-side').height() -50) / 2 - 58})
    $('#shousuo i').click('on',function(){
        if($('#shousuo i')[0].className == 'layui-icon layui-icon-left'){
            $('#shousuo i').removeClass('layui-icon-left').addClass('layui-icon-right')
        }else{
            $('#shousuo i').removeClass('layui-icon-right').addClass('layui-icon-left')
        }
    })

});
